package com.etonedu.meals.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import org.greenrobot.eventbus.EventBus;

public class TimeChangeReceiver extends BroadcastReceiver {
        @Override
        public void onReceive(Context context, Intent intent) {
            try {
                switch (intent.getAction()) {
                    case Intent.ACTION_TIME_TICK:
                        //每过一分钟 触发
                        EventBus.getDefault().postSticky("心跳");
                        break;
                }
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }